home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 02 Useful Techniques / 08 Zarozinski / src / ffllapi / DefuzzVarObj.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-11-13  |  1.5 KB  |  64 lines

  1. //
  2. // File:    DefuzzVarObj.h
  3. //
  4. // Purpose:    This file contains the defuzzification objects
  5. //
  6. // Copyright ⌐ 2001 Louder Than A Bomb! Software
  7. //
  8. // This file is part of the FFLL (Free Fuzzy Logic Library) project (http://ffll.sourceforge.net)
  9. // It is released under the BSD license, see http://ffll.sourceforge.net/license.txt for the full text.
  10. //
  11.  
  12. #ifndef _DEFUZZVAROBJ_H
  13. #define _DEFUZZVAROBJ_H
  14.   
  15. #include "FFLLBase.h"
  16. class FuzzyOutVariable;
  17.  
  18.  
  19. //
  20. // Class:    DefuzzVarObj
  21. //
  22. // Abstract base class for defuzzifcation variable objects.
  23. //
  24.  
  25. class DefuzzVarObj : virtual public FFLLBase  
  26. {
  27.     ////////////////////////////////////////
  28.     ////////// Member Functions ////////////
  29.     ////////////////////////////////////////
  30.  
  31.      public:
  32.  
  33.         // constructor/destructor funcs
  34.         DefuzzVarObj(FuzzyOutVariable* _parent); 
  35.         DefuzzVarObj(); // No function body for this. Explicitly disallow auto-creation of it by the compiler
  36.         virtual ~DefuzzVarObj() ;  
  37.  
  38.         // get functions
  39.         virtual int get_defuzz_type() const = 0;    
  40.  
  41.         // misc functions
  42.          virtual    RealType calc_value(DOMType* out_set_dom_arr ) = 0;
  43.  
  44.     protected:
  45.  
  46.         // get functions
  47.         FuzzyOutVariable* get_parent() const;
  48.  
  49.     ////////////////////////////////////////
  50.     ////////// Class Variables /////////////
  51.     ////////////////////////////////////////
  52.  
  53.     public:
  54.         // types of defuzzification: Center of Gravity, Mean of Maximum 
  55.         enum DEFUZZ_TYPE { COG, MOM };
  56.  
  57. }; // end class DefuzzVarObj
  58.  
  59. #else
  60.  
  61. class DefuzzVarObj;
  62.  
  63. #endif // _DEFUZZVAROBJ_H
  64.